<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0,user-scalable=no,minimal-ui">
        <meta name="description" content="">
        <meta name="author" content="">
        <link rel="icon" href="../img/asset-favico.ico">
        <title>传智健康</title>
        <link rel="stylesheet" href="../css/page-health-index.css" />
        <link rel="stylesheet" href="../css/page-health-login.css" />
        <link rel="stylesheet" href="../plugins/elementui/index.css" />
        <script src="../plugins/jquery/dist/jquery.min.js"></script>
        <script src="../plugins/healthmobile.js"></script>
        <script src="../plugins/vue/vue.js"></script>
        <script src="../plugins/vue/axios-0.18.0.js"></script>
        <script src="../plugins/elementui/index.js"></script>
        <script>

        </script>
    </head>
    <body data-spy="scroll" data-target="#myNavbar" data-offset="150">
        <div class="app">
            <!-- 页面头部 -->
            <div class="top-header">
                <span class="f-left"><i class="icon-back" onclick="history.go(-1)"></i></span>
                <span class="center">传智健康</span>
                <span class="f-right"><i class="icon-more"></i></span>
            </div>
            <!-- 页面内容 -->
            <div class="contentBox">
                <div class="list-column2">
                    <ul class="list">
                        <li class="type-item" v-for="item in dataList" style="width: 100%" @click="handleDetail(item.id)">
                            <a class="link-page">
                                <div class="type-title">
                                    <h3>{{item.memberName}}</h3>
                                    <p>{{item.sex == '0' ? '性别不限' : item.sex == '1' ? '男':'女'}}</p>
                                    <p>{{item.setmealName}}</p>
                                    <p>{{item.orderDate}}</p>
                                </div>
                                <div class="type-icon">
                                    查看
                                </div>
                            </a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </body>

    <script>
        var vue = new Vue({
            el: '.app',
            data: {
                pagination: {//分页相关模型数据
                    currentPage: 1,//当前页码
                    pageSize: 10,//每页显示的记录数
                    total: 0,//总记录数
                    queryString: null//查询条件
                },
                dataList: [],//当前页要展示的分页列表数据
                formData: {},//表单数据
                checkgroupList: {},
                dialogFormVisible: false,//增加表单是否可见
            },
            //钩子函数，VUE对象初始化完成后自动执行
            created() {
               this.findByMemberId();
            },
            methods: {
                //查看详情
                handleDetail(orderId){
                    //根据orderId查询检查组和检查项及内容信息
                    window.location.href="/pages/checkrecord_detail.html?orderId="+orderId;
                },
                //查询
                findByMemberId() {
                    var memberId = getUrlParam("memberId");//根据URL地址栏中的参数名称获取对应的值
                    alert(memberId);
                    axios.post("/order/findByMemberId.do?memberId="+memberId).then((res) => {
                        if(res.data.flag){
                            this.dataList=res.data.data;
                        }
                    });
                },
            }
        })
    </script>
</html>